package base;

import java.util.HashMap;
import java.util.Map;

import android.app.Application;
import android.content.Context;
import android.os.Handler;
/**
 * 程序入口
 * @author Anson-pc
 *
 */
public class BaseApplication extends Application {
	
	private static Context mContext;
    private static Handler handler;
    private static long    mainTheadId;

    //存储对象
    private Map<String,String> mCacheMap = new HashMap<String, String>();
    
    public Map<String,String> getCacheMap(){
    	return mCacheMap;
    }
    
    
    public static Context getmContext() {
        return mContext;
    }

    public static Handler getHandler() {
        return handler;
    }

    public static long getMainTheadId() {
        return mainTheadId;
    }

    @Override
    public void onCreate() {
        //
        mContext = getApplicationContext();

        //获取主Hanlder
        handler = new Handler();

        //获取主线程Id
        mainTheadId = android.os.Process.myTid();

        super.onCreate();
    }
}
